import asyncComponent from "@src/common/asyncComponent";

const Home = asyncComponent(() => import("@src/view/Home"));
const Hooks = asyncComponent(() => import("@src/Hooks"));
const ComponentComunication = asyncComponent(() => import("@src/view/ComponentComunication"));

const Techology = asyncComponent(() => import("@src/view/Techology"));
const MobxLearn = asyncComponent(() => import("@src/view/MobxLearn"));


const NotFound = asyncComponent(() => import("@src/view/NotFound"));



const RouteList = [
    {
        path: '/hooks',
        exact: true,
        component: Hooks,
    },{
        path: '/ComponentComunication',
        exact: true,
        component: ComponentComunication
    },{
        path: '/techology',
        exact: true,
        component: Techology,
    },{
        path: '/mobx',
        exact: true,
        component: MobxLearn,
    }
]

const routes=[
    ...RouteList,
    {
        path: '/',
        exact: true,
        component: Home,
    }, {
        path: '/home',
        exact: true,
        component: Home,
    },{
        path: '*',
        component: NotFound
    }
]

export default routes
